Conversation
f9dd8ad to
5b19b88
Compare
|
@compnerd, @roman-bcny: In order to prepare for a first official (pre-)release including Windows support, I set up this installer build mimicking what you have done for SwiftFormat. Please have a look! 🙏 |
| $archDir = ('${{ matrix.target-triple }}'.Split('-')[0]) | ||
| $staticLibDir = Join-Path $sdk (Join-Path 'usr\lib\swift_static\windows' $archDir) | ||
| Copy-Item -Path (Join-Path $staticLibDir 'libcurl.lib') -Destination (Join-Path $staticLibDir 'curl.lib') -Force | ||
| Copy-Item -Path (Join-Path $staticLibDir 'libxml2s.lib') -Destination (Join-Path $staticLibDir 'xml2.lib') -Force |
There was a problem hiding this comment.
This feels very strange. However, it cannot be built without having both names available. I can reproduce this locally.
There was a problem hiding this comment.
Hmm. Not sure what's up with that. One thing to try could be snapshot from a different date? I had a bunch of those not working last time I checked until I found one that seemed good.
There was a problem hiding this comment.
This is wrong. I think that the copying here needs to be done because you are missing compile flags. I think that you might need -Xcc -DCURL_STATICLIB -Xcc -DLIBXML_STATIC.
There was a problem hiding this comment.
It exists with
[116/118] Write Objects.LinkFileList
lld-link: error: could not open 'xml2.lib': no such file or directory
lld-link: error: could not open 'curl.lib': no such file or directory
clang: error: linker command failed with exit code 1 (use -v to see invocation)
with only these defines.
There was a problem hiding this comment.
It's the same with just https://github.com/jpsim/SourceKitten which has Clang dependencies. So I guess some options are not passed on to this lower level and xml2.lib is more or less "hard-coded" somewhere, so it needs to be found as such.
There was a problem hiding this comment.
The problem is that code generation is impacted by that macro and you now have some code assuming static linking and some assuming dynamic linking. I think that we should simply go through and find and address the incorrect expectation.
There was a problem hiding this comment.
It works with explicit linking options:
-Xlinker /NODEFAULTLIB:curl -Xlinker libcurl.lib
-Xlinker /NODEFAULTLIB:xml2 -Xlinker libxml2s.lib
-Xlinker zlibstatic.lib
-Xlinker brotlidec.lib
-Xlinker brotlicommon.libI think that's acceptable.
5b19b88 to
88e7845
Compare
| $archDir = ('${{ matrix.target-triple }}'.Split('-')[0]) | ||
| $staticLibDir = Join-Path $sdk (Join-Path 'usr\lib\swift_static\windows' $archDir) | ||
| Copy-Item -Path (Join-Path $staticLibDir 'libcurl.lib') -Destination (Join-Path $staticLibDir 'curl.lib') -Force | ||
| Copy-Item -Path (Join-Path $staticLibDir 'libxml2s.lib') -Destination (Join-Path $staticLibDir 'xml2.lib') -Force |
There was a problem hiding this comment.
This is wrong. I think that the copying here needs to be done because you are missing compile flags. I think that you might need -Xcc -DCURL_STATICLIB -Xcc -DLIBXML_STATIC.
9fa54df to
e9deb0f
Compare
aaba910 to
ae39552
Compare
|
🥳 |
Resolves #6353.